From dd10ccf86d9e61d6ec81c51e5b8c09cb30da9b3e Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Wed, 3 Apr 2024 18:00:34 -0700
Subject: feat(badges): use fallback badge for awc

---
 src/routes/user/[user]/badges/+page.svelte | 37 ++++++------------------------
 1 file changed, 7 insertions(+), 30 deletions(-)

(limited to 'src/routes/user/[user]/badges/+page.svelte')

diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index 20beadf0..5f2c79a0 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -470,20 +470,13 @@
 
 											<div class="badges">
 												{#each group.badges as badge}
-													<a
-														href={badge.link}
-														target="_blank"
-														class="badge"
-														id={`badge-${badge.link}`}
-														title={badge.description}
-														use:tooltip
-													>
-														<FallbackImage
-															source={cdn(thumbnail(badge.image))}
-															alternative={badge.description}
-															fallback={thumbnail(badge.image)}
-														/>
-													</a>
+													<FallbackBadge
+														{badge}
+														source={cdn(thumbnail(badge.image))}
+														alternative={badge.description}
+														fallback={thumbnail(badge.image)}
+														hideOnError={preferences.hide_missing_badges}
+													/>
 												{/each}
 											</div>
 										</details>
@@ -857,20 +850,4 @@
 		grid-template-columns: repeat(auto-fill, minmax(8%, 1fr));
 		gap: 0.25rem;
 	}
-
-	.badge {
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		transition: transform 0.3s ease;
-		box-sizing: border-box;
-	}
-
-	.badge:hover {
-		transform: scale(1.1);
-		position: relative;
-		z-index: 2;
-		transition: transform 0.3s ease;
-	}
 </style>
-- 
cgit v1.2.3

